<?php
/**
 * Created by PhpStorm.
 * User: zl
 * Date: 2017/5/30
 * Time: 9:08
 * 获取待审批的业务类型：出差审批，借车审批，借款审批
 */
    require_once('BusinessApp.php');
    require_once ('../Common.php');
    $sectionID = $_REQUEST['sectionID'];
    $allSection = $_REQUEST['allSection'];
    $state = $_REQUEST['state']; //是部门审批，还是签批，还是领导 , 取值为01,02,03
    $user_id = $_REQUEST['user']; //哪个用户审批


    $result_array = array();
    $result_array['data'] = array();

    $b_app = new BusinessApp();
    echo json_encode($b_app->getTravelApproveBySection($sectionID, $allSection, $state));
//   if($type == 1){
//        //获取出差审批类型
//        $b_app->getTravelApproveBySection($sectionID,$result_array,$allSection, $state);
//        if($result_array['state'] == 0){
//            exit(json_encode($result_array));
//        }
//
//        $curNum = count($result_array['data']);
//        $result_array['total_count'] = $curNum;
//    }
//    if($type == 2){
//        //如果是借款审批类型
//        $b_app->getLoanFeeApproveBySection($sectionID, $result_array, $allSection, $state);
//        if($result_array['state'] == 0){
//            exit(json_encode($result_array));
//        }
//        $curNum = count($result_array['data']);
//        $result_array['total_count'] = $curNum;
//    }
//
//    echo json_encode($result_array);


?>